package com.iplant.pdm.service.basicenum.fpc;

import com.iplant.base.po.enums.BaseEnum;

/**
 * 检验类型
 *
 * @author YouWang·Peng
 * 2023-7-27 13:59:28
 */
public enum FPCCheckType implements BaseEnum {
    /**
     * 默认
     */
    DEFAULT(0, "默认"),
    /**
     * 自检
     */
    SELF_CHECK(1, "自检"),
    /**
     * 互检
     */
    MUTUAL_CHECK(2, "互检"),
    /**
     * 专检
     */
    SPECIAL_CHECK(3, "专检"),
    /**
     *复检
     */
    RE_CHECK(4, "复检");

    private int value;
    private String label;
    private String remark;

    FPCCheckType(int value, String label) {
        this.value = value;
        this.label = label;
    }

    FPCCheckType(int value, String label, String remark) {
        this.value = value;
        this.label = label;
        this.remark = remark;
    }

    /**
     * 通过 value 的数值获取枚举实例
     */
    public static FPCCheckType getEnumType(int val) {
        for (FPCCheckType type : FPCCheckType.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return DEFAULT;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
